$.jfeC.addEditor('Textinput', {
	name: "TextInputEditor",
	start: function(el, options) {
		var attributes = $.jfeC.plugins['core'].getCss(el);
		el.after('<input type="text" id="'+options.elementId+'_jfeCEditor" />').hide();
		var editor = $('#'+options.elementId+'_jfeCEditor');
		$.jfeC.plugins['core'].setCss(editor, attributes);
		editor.val(el.html())
			.focus();
		return true;
	},
	stop: function(el, options) {
		el.show();
		this.getEditorElement(el).hide();

        var data = {};
        data[options['modelName']] = {};
        data[options['modelName']][options['Textinput']['fieldName']] = this.getEditorElement(el).val();
        $.extend(data[options['modelName']], options['Textinput']['addData']);
		
		return {
			action: options['Textinput']['action'],
			type: 'ajax',
			data: data
		};
	},
	validationErrors: function(el,options, data) {
		this.finish(el, options, data, false, false);
		return true;
	},
	finish: function(el, options, data, success, response) {
        var editorElement = this.getEditorElement(el).remove();
		if(success) el.html(editorElement.val());
		editorElement.remove();
		return true;
	}
});